package com.media;

import com.media.cache.CacheUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

import javax.annotation.PreDestroy;

@Slf4j
@EnableAsync
@EnableScheduling
@SpringBootApplication
public class MediaCaptorLiveApplication {

    public static void main(String[] args) {
        SpringApplication.run(MediaCaptorLiveApplication.class, args);
    }

    @PreDestroy
    public void destory() {
        CacheUtil.destory();
    }
}
